﻿using FreeSql.DataAnnotations;
using MySqlX.XDevAPI.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZhonTai.Admin.Core.Entities;
using ZhonTai.Industry.Domain.Offset;
using ZhonTai.Industry.Domain.WorkStation;

namespace ZhonTai.Industry.Domain.FormulaDetail
{
    /// <summary>
    /// 设备配方详情
    /// </summary>
    [Table(Name = "prd_formula_detail")]
    public class FormulaDetailEntity : EntityBase
    {
        /// <summary>
        /// 工站Id
        /// </summary>
        public long StationId { get; set; }

        /// <summary>
        /// 设备配方Id
        /// </summary>
        public long DeviceFormulaId { get; set; }

        /// <summary>
        /// 偏移量Id
        /// </summary>
        public long OffsetId { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string? ParamKey { get; set; }

        /// <summary>
        /// 参数值
        /// </summary>
        public string? ParamValue { get; set; }

        /// <summary>
        /// 启用
        /// </summary>
        public bool Enabled { get; set; }

        /// <summary>
        /// 工站
        /// </summary>
        [Navigate(nameof(StationId))]
        public WorkStationEntity WorkStation { get; set; }

        /// <summary>
        /// 偏移量
        /// </summary>
        [Navigate(nameof(OffsetId))]
        public PLCOffsetEntity PLCOffset { get; set; }
    }
}